Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly
Advanced tools
Transform static class fields assignments that are affected by https://crbug.com/v8/12421
@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly is a Babel plugin designed to address a specific bug in V8 (the JavaScript engine used in Chrome and Node.js) related to static class fields. This plugin ensures that static class fields are correctly redefined as readonly, preventing unexpected behavior in JavaScript code.
Fix V8 static class fields bug
This feature ensures that static class fields in JavaScript are correctly treated as readonly, preventing them from being reassigned. The plugin modifies the behavior of static class fields to align with the expected behavior in V8.
class MyClass {
static myField = 42;
}
MyClass.myField = 100; // This will not change the value of myField due to the plugin
This Babel plugin allows you to use class properties in your JavaScript code. While it does not specifically address the V8 bug related to static class fields, it provides a broader set of features for working with class properties, both static and instance.
This plugin transforms ES6 classes to ES5, ensuring compatibility with older JavaScript environments. It does not specifically address the V8 static class fields bug but provides a comprehensive solution for transforming modern class syntax.
Transform static class fields assignments that are affected by https://crbug.com/v8/12421
See our website @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly for more information.
Using npm:
npm install --save-dev @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly
or using yarn:
yarn add @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly --dev
v7.25.9 (2024-10-22)
babel-parser
, babel-template
, babel-types
syntacticPlaceholders
mode (@liuxingbaoyu)babel-helper-compilation-targets
, babel-preset-env
ClassAccessorProperty
to prevent the no-undef
rule (@victorenator)babel-parser
, babel-types
VISITOR_KEYS
etc. faster to access (@liuxingbaoyu)FAQs
Transform static class fields assignments that are affected by https://crbug.com/v8/12421
The npm package @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly receives a total of 8,746,774 weekly downloads. As such, @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly popularity was classified as popular.
We found that @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.